<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>欢迎登陆</title>
<%@ include file="/common/meta.jsp"%>
<script type="text/javascript">
$(function(){
	
	
});
//修改
function modify(id,name,pass){
	parent.document.getElementById("id").value = id;
	parent.document.getElementById("name").value = name;
	parent.document.getElementById("pass").value = pass;
}
//删除
function deleteById(id){
	if(confirm("您确认当前操作吗？确定后将不能修改。")){
		parent.document.forms[0].target = "main";
		parent.document.forms[0].action = "${ctx}/des/news/news!delete.action";
		parent.document.forms[0].submit();
	}
}
</script>
</head>
<body>
	<ec:table items="userList" var="user"
		action="${ctx}/sys/user/list.action"
		imagePath="${pageContext.request.contextPath}/images/ectable/*.gif">
		<ec:exportXls fileName="userList.xls" tooltip="导出 Excel" />
		<ec:row highlightRow="true">
			<ec:column property="checkbox"
				title='<input type="checkbox" name="allItems" id="allItems" value=""/>'
				sortable="false" viewsAllowed="html" style="width: 4%;">
				<input type="checkbox" name="itemlist" value="${user.id}"
					style="border: 0px" />
			</ec:column>
			<ec:column property="name" title="用户名" width="18%" alias="name" />
			<ec:column property="pass" title="密码" width="12%" alias="pass" />

			<ec:column property="edit" title="操作" sortable="false"
				viewsAllowed="html" style="width: 10%">
				<a id="modify"
					onclick="modify('${user.id}','${user.name}','${user.pass}');">修改</a>
				<a href="#" id="delete" onclick="deleteById('${user.id}')">删除</a>
			</ec:column>
		</ec:row>
	</ec:table>
</body>
</html>